import sys
from fontTools import ttLib

def shortName( font ):
    name = ""

    ret = []
    for record in font['name'].names:
        if b'\0' in record.string:
            ret.append(str(record.string, 'utf-16-be').encode('utf-8'))
        else:
            ret.append(record.string)
    return ret

tt = ttLib.TTFont("/usr/share/fonts/simhei.ttf")
print(shortName(tt))
